import { FieldType } from 'choerodon-ui/pro/lib/data-set/enum';
import { DataSetProps } from 'choerodon-ui/pro/lib/data-set/DataSet';

const type = FieldType.string;
// const booleanType = FieldType.boolean;

const basicDS = (): DataSetProps => ({
  primaryKey: 'numberid',
  name: 'user',
  autoQuery: true,
  pageSize: 100,
  queryUrl: '/_api/goods/getTable',
  fields: [
    {
      name: 'numberid',
      type,
      label: '序号',
    },
    {
      name: 'name',
      type,
      label: '平台属性',
    },
    {
      name: 'nameValue',
      type,
      label: '平台属性值',
    },
  ],
  events: {
    submit: ({ data }: any) => console.log('submit data', data),
  },
});

export default basicDS;